package com.lyd.service.impl;

import java.util.List;

import com.lyd.dao.FileDao;
import com.lyd.dao.impl.FileDaoImpl;
import com.lyd.entity.FileEntity;
import com.lyd.service.FileService;

public class FileServiceImpl implements FileService {
   private FileDao fileDao=new FileDaoImpl();

@Override
public boolean addFile(FileEntity nodeName) {
	fileDao.addFile(nodeName);
	return false;
}

@Override
public boolean updateFile(FileEntity nodeName) {
	fileDao.updateFile(nodeName);
	return false;
}

@Override
public boolean deleteFile(String nodeName) {
	fileDao.deleteFile(nodeName);
	return false;
}

@Override
public List<FileEntity> listAll() {
	
	return fileDao.listAll();
}

@Override
public List<FileEntity> listAll(String name) {
	
	return fileDao.listAll(name);
}

@Override
public boolean isExists(String nodeName) {
	if(fileDao.get(nodeName)!=null) {
		return true;
	}
	return false;
}
	
}
